package com.guiji.text2video.system.api;

import com.guiji.text2video.common.core.constant.ServiceNameConstants;
import com.guiji.text2video.system.api.domain.FastVideoSimilarityRequest;
import com.guiji.text2video.system.api.factory.RemoteNLPFallbackFactory;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * NLP微服务
 *
 * @author 钟维澎（四月）
 */
@FeignClient(contextId = "remoteNLPService", value = ServiceNameConstants.NLP_SERVICE, fallbackFactory = RemoteNLPFallbackFactory.class)
public interface RemoteNLPService {
    @PostMapping(value = "/api/hello")
    public Response nlp(@RequestBody String nlp);

    @PostMapping(value = "/api/similarity")
    public Response similarity(@RequestBody FastVideoSimilarityRequest request);
}
